package com.nginxmanager.server.serverIpm;

import com.nginxmanager.comment.FileTool;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2018-02-01.
 */
public class FileServer {
    FileTool fileTool = new FileTool();

    public List<String> readLog(String path){
        List<String> list = fileTool.readFile(path);
        return list;
    }

    public List<String> copy(String path,String newPath){
        List<String> list = new ArrayList<String>();
        System.out.println("删除单个文件" + newPath + "失败！");
        System.out.println("删除单个文件" + path + "失败！");
        try {
             list = fileTool.copyFile(path,newPath);
        }catch (Exception e){
            list.add(e.toString());
        }
        return list;
    }
}
